package cn.edu.zzuli;

/**
 * @Date: 2021/3/6 17:13
 * @Author: 绯色下午茶
 * @Description:
 */
interface Foo {
    int add(int x, int y);

    default int index(int x, int y) {
        return x + y;
    }
    static int addS(int x, int y) {
        return x + y;
    }
}
public class LambdaExpressDemo {
    public static void main(String[] args) {
//        Foo foo1 = new Foo() {
//            @Override
//            public void sayHello() {
//                System.out.println("");
//            }
//        };
//        foo1.sayHello();

        Foo foo = (x, y) -> {
            return x + y;
        };
        System.out.println(foo.add(3, 5));
        System.out.println(foo.index(3, 5));
        System.out.println(Foo.addS(3,5));
    }

}
